# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Jan De Groot <jgc@archlinux.org>

pkgname=gucharmap
pkgver=15.0.4
pkgrel=1
pkgdesc="Gnome Unicode Charmap"
url="https://wiki.gnome.org/Apps/Gucharmap"
arch=(x86_64)
license=(GPL3)
depends=(gtk3)
makedepends=(
  appdata-tools
  git
  gobject-introspection
  gtk-doc
  meson
  unicode-character-database
  unzip
  vala
  yelp-tools
)
provides=(libgucharmap_2_90.so)
options=(!lto)
_commit=367f957574e7d7277839e7dfc3de6890937c4e2a  # tags/15.0.4^0
source=("git+https://gitlab.gnome.org/GNOME/gucharmap.git#commit=$_commit")
b2sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  local meson_options=(
    -D b_lto=false
    -D ucd_path=/usr/share/unicode
  )

  arch-meson $pkgname build "${meson_options[@]}"
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}

# vim:set sw=2 sts=-1 et:
